package com.alibaba.controller;

import com.alibaba.bean.TopFaceResult;
import com.alibaba.service.TopFaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/top", method = RequestMethod.GET)
public class TopFaceController {

    @Autowired
    private TopFaceService topFaceService;

    @PostMapping("/search")
    public TopFaceResult search(int userId) {
        return topFaceService.topValue(userId);
    }


}
